<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/10/22
 * Time: 16:04
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\validate;


class Order extends Base
{
    protected $rule = [
        "title" => "require|max:120",
        "sex" => "require",
        "mobile" => "require|mobile",
        "addr" => "require|max:200",
        "address_lat" => "require",
        "address_desc" => "require",
        "start_time" => "require|integer",
        "string_time" => "require",
        "string_time_id" => "require"
    ];
    protected $message = [
        "title.require" => "输入姓名",
        "title.max" => "姓名输入太长",
        "sex.require" => "请选择性别",
        "mobile.require" => "请输入手机号",
        "mobile.mobile" => "请输入正确的手机号",
        "addr.require" => "请选择地址",
        "addr.max" => "地址长度太长",
        "address_lat.require" => "请选择地址",
        "address_desc.require" => "请输入详情地址",
        "start_time.require" => "请选择日期",
        "start_time.integer" => "日期格式错误",
        "string_time.require" => "请选择时间",
        "string_time_id.require" => "时间选择错误"
    ];
    protected $scene = [
        "add" => ['title', 'sex', 'mobile', 'addr', 'address_lat', 'address_lng', 'address_desc', 'start_time', 'string_time', 'string_time_id']
    ];
}